package com.example.consume;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class WarningConsumer {
    @RabbitListener(queues = "warning.queue")
    public void receiveWarningMsg(Message message) {
        log.info("发现投递失败消息{}", new String(message.getBody()));
    }
}
